package com.webapp.domain.entity;

import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.OneToOne;

@Entity
public class CounselorDetail extends BaseEntity {

	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;
	private long id;// id 主键

	private Counselor counselor;
	private String actualName; // 真实姓名
	private String sex; // 性别
	private String birth; // 出生年月 
	private String idCard; // 身份证号码
	private String phone; // 电话号码
	private String orgCode; // 组织号码
	private String orgName; // 组织名称
	private String legalPerson; // 法人
	private String registration; // 注册地
	private String orgNature; // 组织性质
	private int isAuthenticate; // 是否实名认证
	
	private String area; // 地区
	private String age;	//年龄
	
	private String seniority;	//工作年限
	private String companyName; // 公司名称
	private String nation;	// 民族
	
	private Area areaCounselor;
	//咨询师特有字段
	private String education; //文化程度
	private String role; //身份
	private String jobstart; //开始从业时间
	private String job; //职业
	private String resume; //个人简介
	private String ability;	//擅长领域
	private String address; // 详细地址

	@OneToOne(cascade = CascadeType.ALL, fetch = FetchType.LAZY, targetEntity = Area.class)
	@JoinColumn(name = "area_id",referencedColumnName="id",insertable=true,updatable=true) 
	public Area getAreaCounselor() {
		return areaCounselor;
	}

	public void setAreaCounselor(Area areaCounselor) {
		this.areaCounselor = areaCounselor;
	}

	@Id
	@GeneratedValue(strategy = GenerationType.AUTO)
	public long getId() {
		return this.id;
	}

	public void setId(long id) {
		this.id = id;
	}

	@OneToOne(cascade = CascadeType.ALL, fetch = FetchType.LAZY, targetEntity = Counselor.class)
	@JoinColumn(name = "counselor_id",insertable=true,updatable=true) // 指定一个外键，也可以不指定。
	public Counselor getCounselor() {
		return counselor;
	}

	public void setCounselor(Counselor counselor) {
		this.counselor = counselor;
	}

	public String getActualName() {
		return actualName;
	}

	public void setActualName(String actualName) {
		this.actualName = actualName;
	}

	public String getSex() {
		return sex;
	}

	public void setSex(String sex) {
		this.sex = sex;
	}

	public String getBirth() {
		return birth;
	}

	public void setBirth(String birth) {
		this.birth = birth;
	}

	public String getIdCard() {
		return idCard;
	}

	public void setIdCard(String idCard) {
		this.idCard = idCard;
	}

	public String getPhone() {
		return phone;
	}

	public void setPhone(String phone) {
		this.phone = phone;
	}

	public String getOrgCode() {
		return orgCode;
	}

	public void setOrgCode(String orgCode) {
		this.orgCode = orgCode;
	}

	public String getOrgName() {
		return orgName;
	}

	public void setOrgName(String orgName) {
		this.orgName = orgName;
	}

	public String getLegalPerson() {
		return legalPerson;
	}

	public void setLegalPerson(String legalPerson) {
		this.legalPerson = legalPerson;
	}

	public String getRegistration() {
		return registration;
	}

	public void setRegistration(String registration) {
		this.registration = registration;
	}

	public String getOrgNature() {
		return orgNature;
	}

	public void setOrgNature(String orgNature) {
		this.orgNature = orgNature;
	}

	public int getIsAuthenticate() {
		return isAuthenticate;
	}

	public void setIsAuthenticate(int isAuthenticate) {
		this.isAuthenticate = isAuthenticate;
	}

	public String getAddress() {
		return address;
	}

	public void setAddress(String address) {
		this.address = address;
	}

	public String getCompanyName() {
		return companyName;
	}

	public void setCompanyName(String companyName) {
		this.companyName = companyName;
	}

	public String getArea() {
		return area;
	}

	public void setArea(String area) {
		this.area = area;
	}

	public String getAge() {
		return age;
	}

	public void setAge(String age) {
		this.age = age;
	}

	public String getAbility() {
		return ability;
	}

	public void setAbility(String ability) {
		this.ability = ability;
	}

	public String getSeniority() {
		return seniority;
	}

	public void setSeniority(String seniority) {
		this.seniority = seniority;
	}
	@Column(name = "nation", length = 20)
	public String getNation() {
		return nation;
	}
	public void setNation(String nation) {
		this.nation = nation;
	}

	public String getEducation() {
		return education;
	}

	public void setEducation(String education) {
		this.education = education;
	}

	public String getRole() {
		return role;
	}

	public void setRole(String role) {
		this.role = role;
	}

	public String getJobstart() {
		return jobstart;
	}

	public void setJobstart(String jobstart) {
		this.jobstart = jobstart;
	}

	public String getJob() {
		return job;
	}

	public void setJob(String job) {
		this.job = job;
	}

	public String getResume() {
		return resume;
	}

	public void setResume(String resume) {
		this.resume = resume;
	}

	
}
